package com.chris.design.pattern.samples.chain;

/**
 * @author Chris
 */
public class ResponseAppMain {

    public static void main(String[] args) {
        AbstractHandler handler1 = new ConcreteHandler();
        AbstractHandler handler2 = new ConcreteHandler();

        handler1.setHandler(handler2);
        // 处理请求
        handler1.handleRequest();
        System.out.println("=============================================");
        handler2.setHandler(null);
        // 处理请求
        handler2.handleRequest();
    }
}
